package com.mdtx.database.db;

import com.mdtx.database.AbstractDatabaseOperation;
import com.mdtx.database.type.DbDriverType;
import com.mdtx.database.type.DbType;
import org.springframework.stereotype.Repository;

/**
 * oracle数据库查询实现
 *
 * @author 猫啊
 * @create 2018-06-13 16:55
 **/
@Repository
public class OracleDataBaseOperation extends AbstractDatabaseOperation {

    @Override
    protected String configJdbcUrl() {
        StringBuffer url = new StringBuffer();

        url.append("jdbc:oracle:thin:@").append(dbConfig.getIp()).append(":")
                .append(dbConfig.getPort()).append(":orcl");

        System.out.println(url.toString());

        return url.toString();
    }

    @Override
    protected String getDbType() {
        return DbType.ORACLE;
    }

    @Override
    protected String getDbDriverType() {
        return DbDriverType.ORACLE_DRIVER;
    }
}
